start(){
  mvn clean package -Dmaven.test.skip=true

  mv target/watery-trade-1.0-SNAPSHOT.jar trade-watery.jar

  process_name="trade-watery"
  pid=$(ps -ef | grep "$process_name" | grep -v grep | awk '{print $2}')
  echo "Killing process $pid"
  kill -9 $pid
  echo "成功删除应用:$process_name"

  nohup java -Xms256m -Xmx1024m -Dspring.profiles.active=prd -jar trade-watery.jar > nohup.log &
}

start